<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link rel="stylesheet" href="<{'static/css/bootstrap/bootstrap.min.css'|url}>" />
		<link rel="stylesheet" href="<{'static/css/bootstrap/bootstrap-responsive.min.css'|url}>" />
		<!--[if lt IE 6]> <link rel="stylesheet" href="<{'static/css/bootstrap/bootstrap-ie6.min.css'|url}>" /> <![endif]-->
		<{include file='html.tpl'}>
		<link rel="stylesheet" href="<{'static/css/unicorn.main.css'|url}>" />
		<link rel="stylesheet" href="<{'static/css/unicorn.grey.css'|url}>" class="skin-color" />

		<{include file="form.tpl"}>

		<script src="<{'static/js/bootstrap/bootstrap.min.js'|url}>"></script>
		<!--[if lt IE 6]> <script src="<{'static/js/bootstrap/bootstrap-ie.js'|url}>"></script> <![endif]-->
	</head>
	<body>
		<div id="header">
			<h1><a href="<{'admin'|url}>">Home</a></h1>	
		</div>
		<{include file="admin/nav.tpl"}>

		<{include file="admin/sidebar.tpl"}>

		<{include file="admin/style-switcher.tpl"}>
		
		<div id="content">
			<div id="content-header">
				<h1>修改密碼</h1>
				<{include file="admin/widget.tpl"}>
			</div>
			<div id="breadcrumb">
				<a href="<{'admin'|url}>" title="返回首頁" class="tip-bottom"><i class="icon-home"></i> 後臺</a>
				<a href="<{'admin/setting'|url}>">系統配置</a>
				<a href="<{'admin/setting/change_password'|url}>" class="current">修改密碼</a>
			</div>
			<div class="container-fluid">
				<div class="row-fluid">
					<div class="span12">
						<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-align-justify"></i>									
								</span>
								<h5>修改密碼</h5>
								<span class="label label-info">請牢記新密碼</span>
							</div>
							<div class="widget-content nopadding">
								<form class="form-horizontal" method="post" action="<{'admin/member/change_password_query'|url}>" id="form" novalidate="novalidate" autocomplete="off">
									<div class="control-group">
										<label class="control-label">賬號</label>
										<div class="controls">
											<{$_user.username|escape}>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">原始密碼</label>
										<div class="controls">
											<input type="password" name="original_password" />
											<span class="help-block"><span class="text-error">(*)</span> 請輸入原始密碼</span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">新密碼</label>
										<div class="controls">
											<input type="password" name="password" id="password" />
											<span class="help-block"><span class="text-error">(*)</span> 請輸入新密碼，6位以上</span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">確認密碼</label>
										<div class="controls">
											<input type="password" name="password_verify" />
											<span class="help-block"><span class="text-error">(*)</span> 請確認新密碼，請牢記新密碼</span>
										</div>
									</div>
									<div class="form-actions">
										<input type="submit" value="提交" class="btn btn-primary" />
									</div>
								</form>
							</div>
						</div>			
					</div>
				</div>
				
				<{include file="admin/copyright.tpl"}>
			</div>
		</div>
<{include file="admin/footer.tpl"}>
<script type="text/javascript">
(function($){
$().ready(function(){
	$('#form').on('query', function(event, json, form){
		var $form = $(form);
		if (json.result != 'success')
			$('input',$form).val('');
	}).validate({
		rules:{
			original_password:{
				required: true,
				minlength:6
			},
			password:{
				required: true,
				minlength:6
			},
			password_verify:{
				required:true,
				minlength:6,
				equalTo:"#password"
			}
		}
	});
});
})(jQuery);
</script>
	</body>
</html>
